home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
HARDWARE
/
IICALARM
/
!iicAlarm
/
Tools
/
!AlarmOff
/
!Run
(
.txt
)
Wrap
RISC OS BBC BASIC V Source
|
1994-05-03
|
2KB
|
70 lines
> !Run
AlarmOff 0.10
Switch the Alarm-System off.
buf% 32
+ 2048
"Error in ";
8debug% =
:
Informationstexte anzeigen ?
"XOS_ReadVarVal", "AlarmExt$Debug", buf%, -1, 0, 0
,,d%
d%<>0
debug% =
?buf% = 0
"XOS_ReadVarVal", "Wimp$State", buf%, 30, 0, 0
,,d%
$buf%,8)="commands"
debug% =
1. Reset all the AlarmMode variables.
*Unset AlarmMode
*Unset AlarmExt$Dir
*UnSet Alias$Bye
*UnSet Alias$AlarmOff
*UnSet Alias$AlarmOn
*UnSet Alias$AlarmQuit
*UnSet Alias$AlarmShut
2. Switch off the Alarm-System
SwitchToAlarm
debug%
"Alarm is now off."
"N;-------------------------------------------------------------------------
#<; (1) Wir schalten die Uhr auf Alarm-Modus und damit den
$G; default- (reset-) maessigen Sekundentakt am Alarmausgang aus.
%D; Das Alarmsystem ist damit zwar "an" aber dennoch deaktiviert.
&N;-------------------------------------------------------------------------
SwitchToAlarm
) a% =
peek(0)
(255-1-2-4)
a% += 4
poke(8,0) :
Alarm-Register : alles "aus"
poke(0,a%) :
Status-Register: Alarm-System "an"
Alarm nun aktiv, Bit 0 = 0 --> Alarm = 0
0N;-------------------------------------------------------------------------
18; Speichern eines Bytes an einer beliebigen Adresse.
2N;-------------------------------------------------------------------------
poke(address%, value%)
blk%, clkadr%
blk% 2
clkadr% = %10100000
?blk% = address%
?(blk%+1) = value%
"IIC_Control", clkadr%, blk%, 2
<N;-------------------------------------------------------------------------
=G; Lesen eines Bytes von einer beliebigen Adresse. Kann auch benutzt
>'; werden, um die Adresse zu setzen.
?N;-------------------------------------------------------------------------
peek(address%)
blk%, clkadr%
blk% 2
clkadr% = %10100000
?blk% = address%
"IIC_Control", clkadr% , blk%, 1 :
write address
"IIC_Control", clkadr%+1, blk%, 1 :
read value
= ?blk%